// 用空间换时间 缓存
// 存储记忆
const f = []
const climbStaris = function(n) {
    if(n == 1) {
        return 1
    }
    if(n == 2) {
        return 2
    }
    if(f[n] === undefined)
    f[n] =  climbStaris(n-1) + climbStaris(n-2)
    return f[n]
}
console.log(climbStaris(120))